<template lang="">
  <div class="right">
    <div v-for="(item,index) in itemRight" :key="index">
      <div class="divL">
        <span class="span1">{{item.name}}</span>
        <span class="span2">{{item.description}}</span>
      </div>
      <div class="content" v-for="(item1,index) in item.foods" :key="index">
        <div><img :src=" 'https://elm.cangdu.org/img/'+(item1.image_path)" alt=""></div>
        <div class="r1">
          <div class="d1">{{item1.name}}</div>
          <div class="d2">{{item1.description}}</div>
          <div class="d3">月售{{item1.satisfy_rate}} 好评率{{item1.satisfy_rate}}%</div>
          <div v-if="item1.activity != null">
            <span class="d4">{{item1.activity.image_text}}</span></div>
          <div class="d5">￥{{item1.specfoods[0].price}}</div>
        </div>
        <addOrCrease :addInfo="item1"></addOrCrease>
      </div>
    </div>
  </div>
</template>
<script>
  import addOrCrease from "@/components/addOrCrease.vue"
  export default {
    name: "ShowRight",
    data() {
      return {
      }
    },
    props: ['itemRight'],
    components: {
      addOrCrease,
    }
  }

</script>


<style lang="less" scoped>
  .right {
    width: 73%;
    background-color: white;
    height: 450px;
    overflow: scroll;
  }

  .content {
    display: flex;
    padding: 15px 0;
    border-bottom: 0.5px solid #ccc;
    position: relative;
  }

  .r1 {
    margin-left: 10px;
  }

  img {
    width: 60px;
    height: 60px;
    margin-left: 15px;
  }

  .divL {
    background-color: rgb(245, 245, 245);
    line-height: 45px;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .span1 {
    font-size: 18px;
    font-weight: bold;
    color: #666;

  }

  .span2 {
    font-size: 10px;
    color: #999;
    margin-left: 5px;
    display: inline-block;

  }

  .d1 {
    font-size: 18px;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100px;
  }

  .d2 {
    font-size: 14px;
    line-height: 25px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100px;
  }

  .d3 {
    font-size: 14px;
    line-height: 20px;
  }

  .d4 {
    color: rgb(241, 136, 79);
    border: 1px solid rgb(240, 115, 115);
    font-size: 10px;
    border-radius: 5px;
    display: inline-block;
  }

  .d5 {
    color: #f60;
  }

  .select {
    font-size: 12px;
    position: absolute;
    right: 18px;
    bottom: 20px;
    color: white;
    background-color: #3190e8;
    padding: 6px;
    border-radius: 10px;
  }
</style>